﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nop.Core.Domain.Messages
{
    /// <summary>
    /// Bitmasks for message preference settings
    /// </summary>
    [Flags]
    public enum MessageSettingFlags : uint
    {
        // Invoices
        LogisticsInvoicePaid = 1,
        LogisticsInvoiceReady = 2,
        AllInvoice = LogisticsInvoicePaid | LogisticsInvoiceReady,

        // Logistics
        LogisticsOrderPlaced = 1 << 8,
        LogisticsDelivered = 2 << 8,
        LogisticsFailedPickup = 4 << 8,
        LogisticsSent = 8 << 8,
        AllLogistics = LogisticsOrderPlaced | LogisticsDelivered | LogisticsFailedPickup | LogisticsSent,

        // Commerce
        CommerceOrderCancelled = 1 << 16,
        CommerceOrderCompleted = 2 << 16,
        CommerceOrderPlaced = 4 << 16,
        CommerceSent = 8 << 16,
        CommerceDelivered = 16 << 16,
        AllCommerce = CommerceOrderCancelled | CommerceOrderCompleted | CommerceOrderPlaced | CommerceSent | CommerceDelivered,

        // New letter
        NewsLetterSubscription = 1 << 24,
        AllMisc = NewsLetterSubscription
    }
}
